package com.cabal.module;

import java.io.*;
import java.net.Socket;

public class UploadClient {

    static int i = 1;

    public static void main(String[] args) throws IOException {
        while (true) {
            int port = 38121;
            Socket s = new Socket("82.156.4.197", port);
            StringBuilder sb = new StringBuilder();
            for(int i=0; i<8000; i++){
                sb.append("caonima");
            }
            String result = sb.toString();
            //FileInputStream fis = new FileInputStream("G:\\cabal\\bike.txt");
            if(i < 65535) {
                try {
                    System.out.println(i);
                    // 18112
                    /*OutputStream out = s.getOutputStream();
                    byte[] buf = new byte[1024];
                    int len;

                    while ((len = fis.read(buf)) != -1) {
                        out.write(buf, 0, len);
                    }*/

                    DataOutputStream dos = new DataOutputStream(s.getOutputStream());
                    dos.writeUTF(result);
                    s.isOutputShutdown();
                    //InputStream in = s.getInputStream();
                    //len = in.read(buf);
                    i++;
                } catch (Exception e) {

                }

            }
        }
    }
}
